package com.wcq.studentbackend.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime; // 或 String，取决于您希望如何接收日期时间

// import javax.validation.constraints.NotBlank; // 如果使用Validation
// import javax.validation.constraints.NotNull;

@Data
public class ExamRequestDTO {

    @NotBlank(message = "考试名称不能为空")
    private String examName;

    @NotBlank(message = "科目不能为空")
    private String subject;

    @NotNull(message = "考试时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm")
    private LocalDateTime examTime;

    @NotBlank(message = "地点不能为空")
    private String location;

    private String description;
} 